<template>
	<view class="header">
		<view class="header_box">
			<view class="header_box_name">
				{{$t(name)}}
			</view>
			<slot></slot>
		</view>
		<view class="header_info">
			<view class="header_info_box">
				<view class="header_info_box_week">
					星期三
				</view>
				<view class="header_info_box_date">
					2025/11/11
				</view>
			</view>
			<rui-icons type="wifi" size="30"></rui-icons>
			<view class="header_info_user">
				<rui-icons type="avatar" size="28"></rui-icons>
				<view class="header_info_user_name">
					{{data.nickname}}
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	defineProps({
		data: Object,
		name: String
	})
</script>

<style lang="scss" scoped>
	.header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 60px;
		padding: 10px 15px;
		// background: #eee;

		&_info {
			display: flex;
			align-items: center;

			&_box {
				margin-right: 25px;
				font-size: 14px;
			}

			&_user {
				display: flex;
				align-items: center;
				margin-left: 10px;
				border-left: 1px solid #ccc;
				padding-left: 10px;

				&_name {
					margin-left: 5px;
					font-size: 16px;
				}
			}
		}

		&_box {
			display: flex;
			align-items: center;

			&_name {
				font-size: 28px;
				font-weight: bold;
				margin-right: 20px;
			}
		}
	}
</style>